<div class="inner-container">

  <div class="alert alert-success" role="alert">
    您正在新增运费模板
    <button class="btn btn-default btn-bor-success back-to-list" type="button" (click)="$event.view.history.back()">返回列表
    </button>
  </div>

  <form>
    <div class="form-group form-inline">
      <label class="col-form-label">模板名称</label>
      <input type="text" class="form-control" [(ngModel)]="delivery_name" name="delivery_name" #delivery_nameModel="ngModel" required>
      <span [hidden]="delivery_nameModel.pristine || delivery_nameModel.valid" class="c-red">模板名称不能为空!</span>
    </div>
    <div class="form-group form-inline">
      <label class="col-form-label">宝贝所在地</label>
      <select class="form-control" [(ngModel)]="provinceCode" name="province" (change)="changeProvince()">
        <option value="0">省</option>
        <option value="{{item.code}}" *ngFor="let item of provinceList">{{item.name}}</option>
      </select>
      <select class="form-control" [(ngModel)]="cityCode" name="city" (change)="changeCity()">
        <option value="0">市</option>
        <option value="{{item.code}}" *ngFor="let item of cityList">{{item.name}}</option>
      </select>
      <select class="form-control" [(ngModel)]="regionCode" name="region">
        <option value="0">区</option>
        <option value="{{item.code}}" *ngFor="let item of regionList">{{item.name}}</option>
      </select>
    </div>
    <div>
      <div class="text-center">
        <button class="btn btn-success" *ngIf="!hasSavedTemp" [disabled]="!delivery_name||!regionCode" (click)="nextStep()">下一步</button>
      </div>
    </div>
    <div *ngIf="hasSavedTemp">
      <div class="form-group form-inline">
        <label class="col-form-label">配送方式</label>
        <div class="inline-block">
          <div class="ui-checkbox2" [class.ui-checked]="type_mail">
            <span>平邮</span><i class="iconfont icon-gou"></i>
            <input type="checkbox" name="mail" [(ngModel)]="type_mail" #type_mailModel="ngModel">
          </div>
          <div class="ui-checkbox2" [class.ui-checked]="type_delivery">
            <span>快递</span><i class="iconfont icon-gou"></i>
            <input type="checkbox" name="delivery" [(ngModel)]="type_delivery" #type_deliveryModel="ngModel">
          </div>
          <div class="ui-checkbox2" [class.ui-checked]="type_EMS">
            <span>EMS</span><i class="iconfont icon-gou"></i>
            <input type="checkbox" name="EMS" [(ngModel)]="type_EMS" #type_EMSModel="ngModel">
          </div>
          <span [hidden]="!(!type_mail && !type_delivery && !type_EMS) || (type_mailModel.pristine && type_deliveryModel.pristine && type_EMSModel.pristine)" class="c-red">请选择配送方式!</span>
        </div>
      </div>

      <div class="form-group form-inline">
        <label class="col-form-label delivery-config">运费设置</label>
        <div class="inline-block delivery-model">
          <ul class="table_list none" *ngIf="type_mail">
            <li class="thead group">
              <div class="table_cell">
                <div class="td_panel br_none">平邮运费设置</div>
              </div>
            </li>
            <li class="tbody head group">
              <div class="table_cell edit_range l">
                <div class="td_panel">配送区域</div>
              </div>
              <div class="table_cell edit_f_num l tl">
                <div class="td_panel">首重（g）</div>
              </div>
              <div class="table_cell edit_f_price l tl">
                <div class="td_panel">起步价（￥）</div>
              </div>
              <div class="table_cell edit_l_num l tl">
                <div class="td_panel">续重（g）</div>
              </div>
              <div class="table_cell edit_l_price l tl">
                <div class="td_panel">续价（￥）</div>
              </div>
              <div class="table_cell l tl">
                <div class="td_panel">操作</div>
              </div>
            </li>
            <li class="tbody group js_normal_area" *ngIf="!mailList.length">
              <form #mailForm="ngForm">
                <div class="table_cell edit_range l">
                  <div class="td_panel">全国默认地区</div>
                </div>
                <div class="group input_group">
                  <div class="table_cell edit_f_num l tl">
                    <div class="td_panel">
                  <span class="frm_input_box">
                  <input name="startMail" class="startstandards frm_input" type="number" [(ngModel)]="addMail.starting_weight" required>
                  </span>
                    </div>
                  </div>
                  <div class="table_cell edit_f_price l tr">
                    <div class="td_panel">
                  <span class="frm_input_box">
                  <input name="startfeesMail" class="startfees frm_input" type="number" [(ngModel)]="addMail.starting_weight_price" required>
                  </span>
                    </div>
                  </div>
                  <div class="table_cell edit_l_num l tl">
                    <div class="td_panel">
                  <span class="frm_input_box">
                  <input name="addstandardsMail" class="addstandards frm_input" type="number" [(ngModel)]="addMail.exceed_weight" required>
                  </span>
                    </div>
                  </div>
                  <div class="table_cell edit_l_price l tr">
                    <div class="td_panel">
                      <span class="frm_input_box">
                        <input name="addfeesMail" class="addfees frm_input" type="number" [(ngModel)]="addMail.exceed_weight_price" required>
                      </span>
                    </div>
                  </div>
                  <div class="table_cell edit_l_price l tr">
                    <div class="td_panel">
                      <span class="ml-10">
                        <a href="javascript:;" (click)="tempMailSubmit(mailForm.form.valid)">保存</a>
                      </span>
                    </div>
                  </div>
                </div>
              </form>
            </li>

            <!-- 已添加展示区 start -->
            <li class="tbody group js_normal_area" *ngIf="!!mailList.length">
              <div class="table_cell edit_range l">
                <div class="td_panel">全国默认地区</div>
              </div>
              <div class="group input_group">
                <div class="table_cell edit_f_num l tl">
                  <div class="td_panel">
                <span class="frm_input_box">
                <input name="startMail" class="startstandards frm_input" type="number" value="{{mailList[0].starting_weight}}" disabled>
                </span>
                  </div>
                </div>
                <div class="table_cell edit_f_price l tr">
                  <div class="td_panel">
                <span class="frm_input_box">
                <input name="startfeesMail" class="startfees frm_input" type="number" value="{{mailList[0].starting_weight_price}}" disabled>
                </span>
                  </div>
                </div>
                <div class="table_cell edit_l_num l tl">
                  <div class="td_panel">
                <span class="frm_input_box">
                <input name="addstandardsMail" class="addstandards frm_input" type="number" value="{{mailList[0].exceed_weight}}" disabled>
                </span>
                  </div>
                </div>
                <div class="table_cell edit_l_price l tr">
                  <div class="td_panel">
                    <span class="frm_input_box">
                      <input name="addfeesMail" class="addfees frm_input" type="number" value="{{mailList[0].exceed_weight_price}}" disabled>
                    </span>
                  </div>
                </div>
                <div class="table_cell edit_l_price l tr">
                  <div class="td_panel">
                    <span class="ml-10">
                      <a href="javascript:;" (click)="editDialog(mailList[0].id,1)">编辑</a>
                      <a *ngIf="mailList.length === 1" href="javascript:;" (click)="delValDialog(mailList[0].id)">删除</a>
                    </span>
                  </div>
                </div>
              </div>
            </li>
            <div *ngFor="let item of mailList;let i = index">
              <li class="tbody group js_custom_area" *ngIf="i>0">

                <div class="table_cell edit_range l">
                  <div class="td_panel group">
                    <div class="group">
                      <div class="text">
                        <p class="">指定地区
                        </p>
                        <p class="area">
                      <span>
                        {{item.range}}
                      </span>
                        </p>
                      </div>
                    </div>
                  </div>
                </div>

                <div class="group input_group">
                  <div class="table_cell edit_f_num l tl">
                    <div class="td_panel">
                    <span class="frm_input_box">
                      <input value="{{item.starting_weight}}" disabled name="startstandardsExtraMail" class="startstandards frm_input" type="number">
                    </span>
                    </div>
                  </div>
                  <div class="table_cell edit_f_price l tr">
                    <div class="td_panel">
                    <span class="frm_input_box">
                      <input value="{{item.starting_weight_price}}" disabled name="startfeesExtraMail" class="startfees frm_input" type="number">
                    </span>
                    </div>
                  </div>
                  <div class="table_cell edit_l_num l tl">
                    <div class="td_panel">
                    <span class="frm_input_box">
                      <input value="{{item.exceed_weight}}" disabled name="addstandardsExtraMail" class="addstandards frm_input" type="number">
                    </span>
                    </div>
                  </div>
                  <div class="table_cell edit_l_price l tr">
                    <div class="td_panel">
                    <span class="frm_input_box">
                      <input value="{{item.exceed_weight_price}}" disabled name="addfeesExtraMail" class="addfees frm_input" type="number">
                    </span>
                    </div>
                  </div>
                  <div class="table_cell edit_l_price l tr">
                    <div class="td_panel">
                    <span class="ml-10">
                      <a href="javascript:;" (click)="editDialog(item.id,0)">编辑</a>
                      <a href="javascript:;" (click)="delValDialog(item.id)">删除</a>
                    </span>
                    </div>
                  </div>
                </div>

              </li>
            </div>
            <!-- 已添加展示区 end -->
            <li class="tbody group js_custom_area" *ngIf="!!mailList.length">
              <div class="table_cell edit_range l">
                <div class="td_panel group">
                  <div class="group">
                    <div class="text">
                      <p class="">指定地区 <a href="javascript:;" (click)="addCityDialog(0)">添加</a>
                      <p class="area">
                       <span>
                        <span *ngIf="!extraMailRange.length">未选择任何区域</span>
                        <span class="province-item" *ngFor="let item of extraMailRange;let i=index">{{item}}<i (click)="extraMailRange.splice(i,1)">×</i></span>
                      </span>
                      </p>
                    </div>
                  </div>
                </div>
              </div>

              <div class="group input_group">
                <div class="table_cell edit_f_num l tl">
                  <div class="td_panel">
                  <span class="frm_input_box">
                  <input value="" name="startstandardsExtraMail" class="startstandards frm_input" type="number" [(ngModel)]="addExtraMail.starting_weight">
                  </span>
                  </div>
                </div>
                <div class="table_cell edit_f_price l tr">
                  <div class="td_panel">
                  <span class="frm_input_box">
                  <input value="" name="startfeesExtraMail" class="startfees frm_input" type="number" [(ngModel)]="addExtraMail.starting_weight_price">
                  </span>
                  </div>
                </div>
                <div class="table_cell edit_l_num l tl">
                  <div class="td_panel">
                  <span class="frm_input_box">
                  <input value="" name="addstandardsExtraMail" class="addstandards frm_input" type="number" [(ngModel)]="addExtraMail.exceed_weight">
                  </span>
                  </div>
                </div>
                <div class="table_cell edit_l_price l tr">
                  <div class="td_panel">
                  <span class="frm_input_box">
                  <input value="" name="addfeesExtraMail" class="addfees frm_input" type="number" [(ngModel)]="addExtraMail.exceed_weight_price">
                  </span>
                  </div>
                </div>
                <div class="table_cell edit_l_price l tr">
                  <div class="td_panel">
                    <span class="ml-10">
                      <a href="javascript:;" (click)="tempExtraSubmit(0)">保存</a>
                    </span>
                  </div>
                </div>
              </div>

            </li>
          </ul>

          <ul class="table_list none" *ngIf="type_delivery">
            <li class="thead group">
              <div class="table_cell">
                <div class="td_panel br_none">快递运费设置</div>
              </div>
            </li>
            <li class="tbody head group">
              <div class="table_cell edit_range l">
                <div class="td_panel">配送区域</div>
              </div>
              <div class="table_cell edit_f_num l tl">
                <div class="td_panel">首重（g）</div>
              </div>
              <div class="table_cell edit_f_price l tl">
                <div class="td_panel">起步价（￥）</div>
              </div>
              <div class="table_cell edit_l_num l tl">
                <div class="td_panel">续重（g）</div>
              </div>
              <div class="table_cell edit_l_price l tl">
                <div class="td_panel">续价（￥）</div>
              </div>
            </li>
            <li class="tbody group js_normal_area" *ngIf="!deliveryList.length">
              <form #DeliveryForm="ngForm">
                <div class="table_cell edit_range l">
                  <div class="td_panel">全国默认地区</div>
                </div>

                <div class="group input_group">
                  <div class="table_cell edit_f_num l tl">
                    <div class="td_panel">
                  <span class="frm_input_box">
                  <input value="" name="startstandardsDelivery" class="startstandards frm_input" type="number" [(ngModel)]="addDelivery.starting_weight" required>
                  </span>
                    </div>
                  </div>
                  <div class="table_cell edit_f_price l tr">
                    <div class="td_panel">
                  <span class="frm_input_box">
                  <input value="" name="startfeesDelivery" class="startfees frm_input" type="number" [(ngModel)]="addDelivery.starting_weight_price" required>
                  </span>
                    </div>
                  </div>
                  <div class="table_cell edit_l_num l tl">
                    <div class="td_panel">
                  <span class="frm_input_box">
                  <input value="" name="addstandardsDelivery" class="addstandards frm_input"type="number" [(ngModel)]="addDelivery.exceed_weight" required>
                  </span>
                    </div>
                  </div>
                  <div class="table_cell edit_l_price l tr">
                    <div class="td_panel">
                  <span class="frm_input_box">
                  <input value="" name="addfeesDelivery" class="addfees frm_input" type="number" [(ngModel)]="addDelivery.exceed_weight_price" required>
                  </span>
                    </div>
                  </div>
                  <div class="table_cell edit_l_price l tr">
                    <div class="td_panel">
                    <span class="ml-10">
                      <a href="javascript:;" (click)="tempDeliverySubmit(DeliveryForm.form.valid)">保存</a>
                    </span>
                    </div>
                  </div>
                </div>
              </form>
            </li>

            <!-- 已添加展示区 start -->
            <li class="tbody group js_normal_area" *ngIf="!!deliveryList.length">
              <div class="table_cell edit_range l">
                <div class="td_panel">全国默认地区</div>
              </div>
              <div class="group input_group">
                <div class="table_cell edit_f_num l tl">
                  <div class="td_panel">
                <span class="frm_input_box">
                <input name="startMail" class="startstandards frm_input" type="number" value="{{deliveryList[0].starting_weight}}" disabled>
                </span>
                  </div>
                </div>
                <div class="table_cell edit_f_price l tr">
                  <div class="td_panel">
                <span class="frm_input_box">
                <input name="startfeesMail" class="startfees frm_input" type="number" value="{{deliveryList[0].starting_weight_price}}" disabled>
                </span>
                  </div>
                </div>
                <div class="table_cell edit_l_num l tl">
                  <div class="td_panel">
                <span class="frm_input_box">
                <input name="addstandardsMail" class="addstandards frm_input" type="number" value="{{deliveryList[0].exceed_weight}}" disabled>
                </span>
                  </div>
                </div>
                <div class="table_cell edit_l_price l tr">
                  <div class="td_panel">
                    <span class="frm_input_box">
                      <input name="addfeesMail" class="addfees frm_input" type="number" value="{{deliveryList[0].exceed_weight_price}}" disabled>
                    </span>
                  </div>
                </div>
                <div class="table_cell edit_l_price l tr">
                  <div class="td_panel">
                    <span class="ml-10">
                      <a href="javascript:;" (click)="editDialog(deliveryList[0].id,1)">编辑</a>
                      <a *ngIf="deliveryList.length === 1" href="javascript:;" (click)="delValDialog(deliveryList[0].id)">删除</a>
                    </span>
                  </div>
                </div>
              </div>
            </li>
            <div *ngFor="let item of deliveryList;let i = index">
              <li class="tbody group js_custom_area" *ngIf="i>0">
                <div class="table_cell edit_range l">
                  <div class="td_panel group">
                    <div class="group">
                      <div class="text">
                        <p class="">指定地区
                        </p>
                        <p class="area">
                      <span>
                        {{item.range}}
                      </span>
                        </p>
                      </div>
                    </div>
                  </div>
                </div>

                <div class="group input_group">
                  <div class="table_cell edit_f_num l tl">
                    <div class="td_panel">
                    <span class="frm_input_box">
                      <input value="{{item.starting_weight}}" disabled name="startstandardsExtraMail" class="startstandards frm_input" type="number">
                    </span>
                    </div>
                  </div>
                  <div class="table_cell edit_f_price l tr">
                    <div class="td_panel">
                    <span class="frm_input_box">
                      <input value="{{item.starting_weight_price}}" disabled name="startfeesExtraMail" class="startfees frm_input" type="number">
                    </span>
                    </div>
                  </div>
                  <div class="table_cell edit_l_num l tl">
                    <div class="td_panel">
                    <span class="frm_input_box">
                      <input value="{{item.exceed_weight}}" disabled name="addstandardsExtraMail" class="addstandards frm_input" type="number">
                    </span>
                    </div>
                  </div>
                  <div class="table_cell edit_l_price l tr">
                    <div class="td_panel">
                    <span class="frm_input_box">
                      <input value="{{item.exceed_weight_price}}" disabled name="addfeesExtraMail" class="addfees frm_input" type="number">
                    </span>
                    </div>
                  </div>
                  <div class="table_cell edit_l_price l tr">
                    <div class="td_panel">
                    <span class="ml-10">
                      <a href="javascript:;" (click)="editDialog(item.id,0)">编辑</a>
                      <a href="javascript:;" (click)="delValDialog(item.id)">删除</a>
                    </span>
                    </div>
                  </div>
                </div>
              </li>
            </div>
            <!-- 已添加展示区 end -->

            <li class="tbody group js_custom_area" *ngIf="!!deliveryList.length">
              <div class="table_cell edit_range l">
                <div class="td_panel group">
                  <div class="group">
                    <div class="text">
                      <p class="">指定地区 <a href="javascript:;" (click)="addCityDialog(1)">添加</a>
                      <p class="area">
                       <span>
                        <span *ngIf="!extraDeliveryRange.length">未选择任何区域</span>
                        <span class="province-item" *ngFor="let item of extraDeliveryRange;let i=index">{{item}}<i (click)="extraDeliveryRange.splice(i,1)">×</i></span>
                      </span>
                      </p>
                    </div>
                  </div>
                </div>
              </div>

              <div class="group input_group">
                <div class="table_cell edit_f_num l tl">
                  <div class="td_panel">
                  <span class="frm_input_box">
                  <input value="" name="startstandardsExtraDe" class="startstandards frm_input" type="number" [(ngModel)]="addExtraDelivery.starting_weight">
                  </span>
                  </div>
                </div>
                <div class="table_cell edit_f_price l tr">
                  <div class="td_panel">
                  <span class="frm_input_box">
                  <input value="" name="startfeesExtraDe" class="startfees frm_input" type="number" [(ngModel)]="addExtraDelivery.starting_weight_price">
                  </span>
                  </div>
                </div>
                <div class="table_cell edit_l_num l tl">
                  <div class="td_panel">
                  <span class="frm_input_box">
                  <input value="" name="addstandardsExtraDe" class="addstandards frm_input" type="number" [(ngModel)]="addExtraDelivery.exceed_weight">
                  </span>
                  </div>
                </div>
                <div class="table_cell edit_l_price l tr">
                  <div class="td_panel">
                  <span class="frm_input_box">
                  <input value="" name="addfeesExtraDe" class="addfees frm_input" type="number" [(ngModel)]="addExtraDelivery.exceed_weight_price">
                  </span>
                  </div>
                </div>
                <div class="table_cell edit_l_price l tr">
                  <div class="td_panel">
                    <span class="ml-10">
                      <a href="javascript:;" (click)="tempExtraSubmit(1)">保存</a>
                    </span>
                  </div>
                </div>
              </div>

            </li>
          </ul>

          <ul class="table_list none" *ngIf="type_EMS">
            <li class="thead group">
              <div class="table_cell">
                <div class="td_panel br_none">EMS运费设置</div>
              </div>
            </li>
            <li class="tbody head group">
              <div class="table_cell edit_range l">
                <div class="td_panel">配送区域</div>
              </div>
              <div class="table_cell edit_f_num l tl">
                <div class="td_panel">首重（g）</div>
              </div>
              <div class="table_cell edit_f_price l tl">
                <div class="td_panel">起步价（￥）</div>
              </div>
              <div class="table_cell edit_l_num l tl">
                <div class="td_panel">续重（g）</div>
              </div>
              <div class="table_cell edit_l_price l tl">
                <div class="td_panel">续价（￥）</div>
              </div>
            </li>
            <li class="tbody group js_normal_area" *ngIf="!EMSList.length">
              <form #EMSForm="ngForm">
                <div class="table_cell edit_range l">
                  <div class="td_panel">全国默认地区</div>
                </div>
                <div class="group input_group">
                  <div class="table_cell edit_f_num l tl">
                    <div class="td_panel">
                      <span class="frm_input_box">
                        <input value="" name="startstandardsEMS" class="startstandards frm_input" type="number" [(ngModel)]="addEMS.starting_weight" required>
                      </span>
                    </div>
                  </div>
                  <div class="table_cell edit_f_price l tr">
                    <div class="td_panel">
                  <span class="frm_input_box">
                  <input value="" name="startfeesEMS" class="startfees frm_input" type="number" [(ngModel)]="addEMS.starting_weight_price" required>
                  </span>
                    </div>
                  </div>
                  <div class="table_cell edit_l_num l tl">
                    <div class="td_panel">
                  <span class="frm_input_box">
                  <input value="" name="addstandardsEMS" class="addstandards frm_input" type="number" [(ngModel)]="addEMS.exceed_weight" required>
                  </span>
                    </div>
                  </div>
                  <div class="table_cell edit_l_price l tr">
                    <div class="td_panel">
                      <span class="frm_input_box">
                        <input value="" name="addfeesEMS" class="addfees frm_input" type="number" [(ngModel)]="addEMS.exceed_weight_price" required>
                      </span>
                    </div>
                  </div>
                  <div class="table_cell edit_l_price l tr">
                    <div class="td_panel">
                      <span class="ml-10">
                        <a href="javascript:;" (click)="tempEMSSubmit(EMSForm.form.valid)">保存</a>
                      </span>
                    </div>
                  </div>
                </div>
              </form>
            </li>
            <!-- 已添加展示区 start -->
            <li class="tbody group js_normal_area" *ngIf="!!EMSList.length">
              <div class="table_cell edit_range l">
                <div class="td_panel">全国默认地区</div>
              </div>
              <div class="group input_group">
                <div class="table_cell edit_f_num l tl">
                  <div class="td_panel">
                <span class="frm_input_box">
                <input name="startMail" class="startstandards frm_input" type="number" value="{{EMSList[0].starting_weight}}" disabled>
                </span>
                  </div>
                </div>
                <div class="table_cell edit_f_price l tr">
                  <div class="td_panel">
                <span class="frm_input_box">
                <input name="startfeesMail" class="startfees frm_input" type="number" value="{{EMSList[0].starting_weight_price}}" disabled>
                </span>
                  </div>
                </div>
                <div class="table_cell edit_l_num l tl">
                  <div class="td_panel">
                <span class="frm_input_box">
                <input name="addstandardsMail" class="addstandards frm_input" type="number" value="{{EMSList[0].exceed_weight}}" disabled>
                </span>
                  </div>
                </div>
                <div class="table_cell edit_l_price l tr">
                  <div class="td_panel">
                    <span class="frm_input_box">
                      <input name="addfeesMail" class="addfees frm_input" type="number" value="{{EMSList[0].exceed_weight_price}}" disabled>
                    </span>
                  </div>
                </div>
                <div class="table_cell edit_l_price l tr">
                  <div class="td_panel">
                    <span class="ml-10">
                      <a href="javascript:;" (click)="editDialog(EMSList[0].id,1)">编辑</a>
                      <a *ngIf="EMSList.length === 1" href="javascript:;" (click)="delValDialog(EMSList[0].id)">删除</a>
                    </span>
                  </div>
                </div>
              </div>
            </li>
            <div *ngFor="let item of EMSList;let i = index">
              <li class="tbody group" *ngIf="i>0">
                <div class="table_cell edit_range l">
                  <div class="td_panel group">
                    <div class="group">
                      <div class="text">
                        <p class="">指定地区
                        </p>
                        <p class="area">
                      <span>
                        {{item.range}}
                      </span>
                        </p>
                      </div>
                    </div>
                  </div>
                </div>

                <div class="group input_group">
                  <div class="table_cell edit_f_num l tl">
                    <div class="td_panel">
                    <span class="frm_input_box">
                      <input value="{{item.starting_weight}}" disabled name="startstandardsExtraMail" class="startstandards frm_input" type="number">
                    </span>
                    </div>
                  </div>
                  <div class="table_cell edit_f_price l tr">
                    <div class="td_panel">
                    <span class="frm_input_box">
                      <input value="{{item.starting_weight_price}}" disabled name="startfeesExtraMail" class="startfees frm_input" type="number">
                    </span>
                    </div>
                  </div>
                  <div class="table_cell edit_l_num l tl">
                    <div class="td_panel">
                    <span class="frm_input_box">
                      <input value="{{item.exceed_weight}}" disabled name="addstandardsExtraMail" class="addstandards frm_input" type="number">
                    </span>
                    </div>
                  </div>
                  <div class="table_cell edit_l_price l tr">
                    <div class="td_panel">
                    <span class="frm_input_box">
                      <input value="{{item.exceed_weight_price}}" disabled name="addfeesExtraMail" class="addfees frm_input" type="number">
                    </span>
                    </div>
                  </div>
                  <div class="table_cell edit_l_price l tr">
                    <div class="td_panel">
                    <span class="ml-10">
                      <a href="javascript:;" (click)="editDialog(item.id,1)">编辑</a>
                      <a href="javascript:;" (click)="delValDialog(item.id)">删除</a>
                    </span>
                    </div>
                  </div>
                </div>
              </li>
            </div>
            <!-- 已添加展示区 end -->
            <li class="tbody group js_custom_area" *ngIf="!!EMSList.length">
              <div class="table_cell edit_range l">
                <div class="td_panel group">
                  <div class="group">
                    <div class="text">
                      <p class="">指定地区 <a href="javascript:;" (click)="addCityDialog(2)">添加</a>
                      <p class="area">
                        <span>
                          <span *ngIf="!extraEMSRange.length">未选择任何区域</span>
                          <span class="province-item" *ngFor="let item of extraEMSRange;let i=index">{{item}}<i (click)="extraEMSRange.splice(i,1)">×</i></span>
                        </span>
                      </p>
                    </div>
                  </div>
                </div>
              </div>

              <div class="group input_group">
                <div class="table_cell edit_f_num l tl">
                  <div class="td_panel">
                    <span class="frm_input_box">
                      <input value="" name="startstandardsExtraEMS" class="startstandards frm_input" type="number" [(ngModel)]="addExtraEMS.starting_weight">
                    </span>
                  </div>
                </div>
                <div class="table_cell edit_f_price l tr">
                  <div class="td_panel">
                    <span class="frm_input_box">
                      <input value="" name="startfeesExtraEMS" class="startfees frm_input" type="number" [(ngModel)]="addExtraEMS.starting_weight_price">
                    </span>
                  </div>
                </div>
                <div class="table_cell edit_l_num l tl">
                  <div class="td_panel">
                    <span class="frm_input_box">
                      <input value="" name="addstandardsExtraEMS" class="addstandards frm_input" type="number" [(ngModel)]="addExtraEMS.exceed_weight">
                    </span>
                  </div>
                </div>
                <div class="table_cell edit_l_price l tr">
                  <div class="td_panel">
                    <span class="frm_input_box">
                      <input value="" name="addfeesExtraEMS" class="addfees frm_input" type="number" [(ngModel)]="addExtraEMS.exceed_weight_price">
                    </span>
                  </div>
                </div>
                <div class="table_cell edit_l_price l tr">
                  <div class="td_panel">
                    <span class="ml-10">
                      <a href="javascript:;" (click)="tempExtraSubmit(2)">保存</a>
                    </span>
                  </div>
                </div>
              </div>

            </li>

          </ul>
        </div>
      </div>
    </div>

  </form>

</div>

<!-- 是否确定删除 -->
<div class="modal fade" bsModal #deleteModal="bs-modal" tabindex="-1">
  <div class="modal-dialog modal-md">
    <div class="modal-content">
      <div class="modal-header">
        <h4 class="modal-title pull-left">确认</h4>
        <button type="button" class="close pull-right" aria-label="Close" (click)="deleteModal.hide()">
          <span aria-hidden="true">&times;</span>
        </button>
      </div>
      <div class="modal-body text-center">
        <p>确定删除吗？</p>
        <div class="text-right mt20">
          <button class="btn btn-default btn-md-long" type="button" (click)="deleteModal.hide()">取消</button>
          <button class="btn btn-success btn-md-long" type="button" (click)="delSubmit()">确定</button>
        </div>
      </div>
    </div>
  </div>
</div>

<!-- 编辑弹框 -->
<div class="modal fade" bsModal #editModal="bs-modal" tabindex="-1">
  <div class="modal-dialog modal-md">
    <div class="modal-content">
      <div class="modal-header">
        <h4 class="modal-title pull-left">确认</h4>
        <button type="button" class="close pull-right" aria-label="Close" (click)="editModal.hide()">
          <span aria-hidden="true">&times;</span>
        </button>
      </div>
      <div class="modal-body text-center table_list">
        <div class="tbody group">
          <div class="table_cell edit_range l">
            <div class="td_panel group">
              <div class="group">
                <div class="text">
                  <p class="">指定地区 <a href="javascript:;" *ngIf="operateDefault" (click)="addCityDialog(2,true)">添加</a>
                  <p class="area">
                    <span>
                      <span class="province-item" *ngFor="let item of editExpressRange;let i=index">{{item}}<i *ngIf="operateDefault" (click)="editExpressRange.splice(i,1)">×</i></span>
                    </span>
                  </p>
                </div>
              </div>
            </div>
          </div>
          <div class="group input_group">
            <div class="table_cell edit_f_num l tl">
              <div class="td_panel">
                <span class="frm_input_box">
                  <input value="" name="startstandardsExtraEMS" class="startstandards frm_input" type="number" [(ngModel)]="editExpress.starting_weight" required>
                </span>
              </div>
            </div>
            <div class="table_cell edit_f_price l tr">
              <div class="td_panel">
                <span class="frm_input_box">
                  <input value="" name="startfeesExtraEMS" class="startfees frm_input" type="number" [(ngModel)]="editExpress.starting_weight_price" required>
                </span>
              </div>
            </div>
            <div class="table_cell edit_l_num l tl">
              <div class="td_panel">
                <span class="frm_input_box">
                  <input value="" name="addstandardsExtraEMS" class="addstandards frm_input" type="number" [(ngModel)]="editExpress.exceed_weight" required>
                </span>
              </div>
            </div>
            <div class="table_cell edit_l_price l tr">
              <div class="td_panel">
                <span class="frm_input_box">
                  <input value="" name="addfeesExtraEMS" class="addfees frm_input" type="number" [(ngModel)]="editExpress.exceed_weight_price" required>
                </span>
              </div>
            </div>
          </div>

        </div>
        <div class="text-right mt20">
          <button class="btn btn-default btn-md-long" type="button" (click)="editModal.hide()">取消</button>
          <button class="btn btn-success btn-md-long" type="submit" (click)="editSubmit()">确定</button>
        </div>
      </div>
    </div>
  </div>
</div>

<!-- 添加地区弹框 -->
<div class="modal fade" bsModal #cityModal="bs-modal" tabindex="-1">
  <div class="modal-dialog modal-lg">
    <div class="modal-content">
      <div class="modal-header">
        <h4 class="modal-title pull-left">选择地区</h4>
        <button type="button" class="close pull-right" aria-label="Close" (click)="cityModal.hide()">
          <span aria-hidden="true">&times;</span>
        </button>
      </div>
      <div class="modal-body">
        <div class="city-pick-container">
          <div class="city-box">
            <div class="city-title">省、直辖市、市</div>
            <div class="city-list">
              <div class="city-item">
                <a href="javascript:;" class="province" *ngFor="let item of addProvinceList"
                   [ngClass]="{'active': item.name === checkedProvince}"
                   (click)="checkedProvince = item.name">{{item.name}}</a>
              </div>
            </div>
          </div>
          <div class="btn-box">
            <button class="btn btn-default btn-md-long" type="button" (click)="addSelf()">添加</button>
          </div>
          <div class="city-box">
            <div class="city-list">
              <ul class="al-pick-list">
                <li *ngFor="let item of selfAdd;let i=index">{{item}}<span class="iconfont icon-cuowu"  (click)="selfAdd.splice(i,1)"></span></li>
              </ul>
            </div>
          </div>
        </div>
        <!--<input type="text" class="form-control" name="city" [(ngModel)]="selfAdd">-->
        <div class="text-center mt20">
          <button class="btn btn-default btn-md-long" type="button" (click)="cityModal.hide()">关闭</button>
        </div>

      </div>
    </div>
  </div>
</div>

<app-notification [type]="type" [message]="message" [isShow]="isShow" (promptIsShow)="isShow = $event"></app-notification>
